{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 绘制决策树"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 绘制一个带箭头的结点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3de5yOdf7H8dfHYMkYckg5FG1UfshhHhHb0uqAQqUkpS2iVkRF2Ihoa7PJVoQSsWFCB5JzpFRiNIyhFStyXCosyWnm8/tjZscso7mNGRdzvZ+Pxzwe9+F7X/fb18x7rrnu+/re5u6IiEjely/oACIicmao8EVEQkKFLyISEip8EZGQUOGLiISECl9EJCSyLHwzG2NmO80s6ST3m5m9YmbrzSzRzGrnfEwRETldkezhvwU0+ZX7mwKV0746ASNOP5aIiOS0LAvf3T8FfvqVIS2B8Z5qCVDczC7KqYAiIpIz8ufANsoBmzNc35J22/bjB5pZJ1L/CqBIkSJ1rrjiihx4ehGR8Fi+fPkP7l46O4/NicK3TG7LdL0Gd38deB0gNjbW4+Pjc+DpRUTCw8w2ZfexOfEunS1AhQzXywPbcmC7IiKSg3Ki8KcD96W9W6cesNfdTzicIyIiwcrykI6ZTQIaAaXMbAvQHygA4O4jgZlAM2A9cAB4ILfCiohI9mVZ+O5+dxb3O/BIjiUSEZFcoTNtRURCQoUvIhISKnwRkZBQ4YuIhIQKX0QkJFT4IiIhocIXEQkJFb6ISEio8EVEQkKFLyISEip8EZGQUOGLiISECl9EJCRU+CIiIaHCFxEJCRW+iEhIqPBFREJChS8iEhIqfBGRkFDhi4iEhApfRCQkVPgiIiGhwhcRCQkVvohIS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lPDSpUv7qFGjvGTJkl6yZEkfNWqUlypVykuUKOGjRo3yCy64wM8//3wfMWKEX3TRRV68eHEfPny4ly9f3osVK+Yvv/yyV6xY0WNiYvyll17yypUre0xMjA8ePNirVq3qRYsW9b/85S9eq1Ytj46O9v79+3vdunU9Ojra+/Tp49dee61HR0f7Y4895jfccIMXKVLEu3bt6ikpKUH/V8lZAoj3bPauCl8C9eGHH3rx4sV9/vz5fuONN3rdunX9448/9ptvvtlr167t8+fP99tuu81r1Kjhc+fO9datW3vVqlV91qxZfu+99/rll1/uM2bM8A4dOvhll13mH3zwgXfu3NkrVqzoU6dO9e7du/vFF1/scXFx3qtXLy9fvrz/4x//8KefftrLli3rY8aM8WeffdYvvPBCHzlypP/tb3/zMmXK+Kuvvuovv/yylylTxocMGeIjRozwCy+80J9//nkfPXq0X3TRRT5gwAAfN26clytXzvv06eMTJ070ChUq+BNPPOFTpkzxihUrepcuXfz999/33/72t96xY0f/8MMPvUqVKn7ffff5zJkzvWrVqt6mTRufM2eO16hRw2+//XafN2+e165d25s3b+6zZ8/28847zxcuXBj0f5WcJU6n8LW0ggTq4MGDNGnShAsvvJCePXsGHees88wzz3D06FGmTZtGgQIFgo4jZwEtrSDnrEKFCnHTTTfpZKmTSEpKolmzZip7yREqfAnU4sWLGTJkCIMHp34M8r59+5gyZUr6/fHx8XTv3j3Txw4aNIgNGzZE9DxTp049q96xs23bNlq3bp3luCFDhvDUU0+lvyAscjpU+BKoihUrUrhwYZYvXw6cWPi/pl+/flx66aURjb3jjju45ZZbsp0zKEuXLqVkyZKUL6+PiZbTp/fhS6DKly/PwIED6du3LzfffDOvvvoqW7dupW3bttStW5cGDRpw4MABnnzySf71r39x5ZVXMmjQIMyMTp060b17dy6//HIGDRrEmjVrMDNatGjBPffc8z/PM2rUKM477zzatWtHXFwc7777LlFRUVSqVInnn3/+f8Zu27aNp59+ml9++QWAJ598kquuuuqEMY8++ig1a9YkMTGR0qVLM2TIEAoVKsTatWt5/vnnOXjwIOXLl+fpp58mJiaGb775hoEDB1KoUCFq1qyZvq3k5GSGDRvG8uXLOXz4MHfeeSetWrUCYOTIkbzxxhtccMEFuTH9EjLaw5dArV27lp49e9K3b18AunbtSrly5Zg4cSLdunVLH/PEE08wZcoUtm7desIKmd9++y07d+5k8uTJvPPOO7Ro0eKE58norbfeYsKECcTFxfHnP//5hPtLlCjB8OHDmTBhAs8//zwvvvhiptvZvHkzd955J5MnT6Zo0aIsWLAAgP79+9O1a1fi4uK47LLLeOONN4DUF2B79OjB2LFj/2c706ZNo0iRIowfP57x48fzwQcfpJ8z8PTTT9O5c2c2btyYxUyKZE17+BKo/55UVaxYsZOO+b//+z/KlCkDQJUqVdi2bdv/7CGXK1eOrVu3MnjwYH73u99Rr169X33OypUr07dvXxo1akSjRo1OuP/o0aO88MILfPvtt0RFRbFp06ZMt1O2bFkuv/xyAK644gq2bdvG/v372bdvH3Xq1AHglltuoVevXifc3qxZs/STsJYsWcL69evTf2Hs37+fzZs3U65cOYoXL05ycnL6aqAip0OFL4GqVasWzz77LE899RRTp07NdEzBggXTL+fLl++ElTBjYmKYNGkSX375JVOmTGHevHn079//pM/597//nYSEBBYtWsTo0aOZPHky+fMf+1GYMGECJUuWZNKkSaSkpNCgQYNMt5PxnTNRUVEcOnTopM/p7pjZSe/r2bMn11xzzQn39erVi1deeYUrrrjipNsWiZQO6UigfvrpJ1599VWaN28OwHnnnceBAwdOaRt79uwhJSWFxo0b8/DDD6cviZCZlJQU/v3vfxMbG0u3bt3Yv39/+rH6/9q/fz+lSpUiX758zJw585SWWo6OjiYmJoaEhAQgdX3+2rVrU7RoUaKjo9OXYpg1a1b6Y6655hqmTp2a/glemzZtSs/UsmVLhgwZwn/+85+IM4icjPbwJVDx8fHs2LGDW2+9FYDixYtz1VVX0bp1axo0aHDSveuMdu7cyTPPPJO+5swjjzxy0rEpKSn069eP/fv34+60bduWokWL/s+YO++8kyeffJL58+cTGxtL4cKFT+nfNGDAgPQXbcuVK5f+10b//v3TX7TNeNjp1ltvZfv27dxzzz24O+effz5DhgwBUt9dFBcXR1JSEvXr1z+lHCLH05m2ErjHH3+cxYsXM2LEiKCjnHXuv/9+WrVqxYABA4KOImcJnWkr56zk5GQ2b95MiRIlgo5yVipevDgbN27UipmSI1T4EqiZM2cyf/58+vTpw9ChQ3nmmWc4fPgww4YNo1+/fhw8eJDXX3+dPn368MsvvzB27Fh69uzJ/v37mThxIo899hh79+5l6tSpPProo/z0009Mnz6dRx55hF27djF79mz+9Kc/sWPHDhYsWECnTp3YsmULixcvpmPHjmzcuJGlS5fSoUMH1q1bx4oVK2jfvj1r1qwhKSkp/WMU165dS4cOHYiPj2fDhg08+OCDfPHFF3z//fd06tSJTz75hG3btvHwww8zd+5cdu7cSefOnZkxYwY//vgjjz76KO+++y579uzhscceIy4ujn379tGjRw/Gjx/PgQMH6NWrF6NHj+bgwYM89dRTvPbaawwYMIApU6awaNGioP+rJA/QIR0J1KFDh7jttttYsWIFlSpVolSpUixbtoyyZcty6aWXsnjxYkqVKkWNGjVYsGABMTEx1K9fn9mzZ1O4cGFuuOEGPvzwQ/Lnz0+LFi149913MTPuuusuJk2ahLtz3333MX78eFJSUmjfvj1jx44lOTmZhx56iDfeeIOUlBQefvhhRo0ahbvTuXNnRowYkX75tddew8x4+OGHee2118iXLx+dOnVi1KhRREVF0b59e0aPHk1UVBR//OMfeeuttzAz7rnnnvQMrVu35r333iM5OZlbb72V2bNnc+jQIZo2bcqnn37K/v37uf766/n666/56aef+P3vf8+3337Ljh07qF+/PnFxcf/zTiIJr9M5pKPlkSVwBw8e9DfeeMP37dvnhw8f9tGjR/uePXv8yJEjPmbMGP/hhx88OTnZx40b5zt27PCUlBR/++23fevWrZ6SkuKTJk3yTZs2ubv7lClTfP369e7u/v777/s///lPd09dhnn16tXu7j5r1ixfuXKlu7vPmzfP4+Pj3d194cKFvmTJEnd3/+yzz/zzzz93d/cvv/zSFy1a5O7uy5Yt8/nz57u7e0JCgs+ePdvd3VetWuUfffSRu7t/8803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ZyzdmRXJXAwA7jWzLcBMoOuZiXbWOdU+ASJbWuF05NiyDHlAxP9OM7sXiAUa5mqi4PzqXJhZPlJXXb3/TAUKUCTfF/lJPazTiNS/+j4zs2ruvieXs51pkczF3cBb7j7EzK4h9fyfau6ekvvxzirZ6s3c3sPXsgzHRDIXmNn1wFNAC3c/dIaynWlZzUVRoI5nwOoAAAEsSURBVBrwiZltJPUY5fQ8+sJtpD8j09z9iLt/B6wl9RdAXhPJXHQAJgO4+5dAIVIXVgubiPrkeLld+FqW4Zgs5yLtMMYoUss+rx6nhSzmwt33unspd6/o7hVJfT2jhbtne9Gos1gkPyMfkPqCPmZWitRDPBvOaMozI5K5+B5oDGBmV5Ja+LvOaMqzw3TgvrR369QD9rr79qwelKuHdDz3lmU450Q4F38DooEpaa9bf+/uLQILnUsinItQiHAu5gA3mtkaIBno6e4/Bpc6d0Q4F08Ab5jZY6Qewrg/L+4gmtkkUg/hlUp7vaI/UADA3UeS+vpFM2A9cAB4IKLt5sG5EhGRTOhMWxGRkFDhi4iEhApfRCQkVPgiIiGhwhcRCQkVvohISKjwRURC4v8B0rPBQ+09y+8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "note_text = 'this is a node'\n",
    "node_style = dict(boxstyle=\"sawtooth\", fc=\"0.8\")\n",
    "node_position = (0.5, 0.1)\n",
    "\n",
    "arrow_style = dict(arrowstyle=\"<-\")\n",
    "arrow_start_position = (0.1, 0.5)\n",
    "\n",
    "def plotNode(nodeTxt, centerPt, parentPt, nodeType):\n",
    "    plt.annotate(nodeTxt, \n",
    "                 xy=parentPt, xycoords='axes fraction',\n",
    "                 xytext=centerPt, textcoords='axes fraction',\n",
    "                 va=\"center\", ha=\"center\", \n",
    "                 bbox=nodeType, arrowprops=arrow_style)\n",
    "    \n",
    "\n",
    "plotNode(note_text, node_position, arrow_start_position, node_style)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
